package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 存储箱历史存储信息
 * </p>
 *
 * @author mt
 * @since 2022-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_storage_box_circ_info_his")
public class StorageBoxCircInfoHis extends Model<StorageBoxCircInfoHis> {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 更新人id
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号 默认为 1
     */
    @TableField("version")
    @Version
    private String version;

    /**
     * 状态	0初始化，1完成
     */
    @TableField("status")
    private Integer status;

    /**
     * 内部编码，系统自动生成
     */
    @TableField("inter_code")
    private String interCode;

    /**
     * 编码
     */
    @TableField("code")
    private String code;

    /**
     * 工单id
     */
    @TableField("word_order_id")
    private Long wordOrderId;

    /**
     * 绑定存储箱id，关联存储箱表：t_storage_box
     */
    @TableField("storage_box_id")
    private Long storageBoxId;

    /**
     * 存储箱编码
     */
    @TableField("storage_code")
    private String storageCode;

    /**
     * 是否为空	0空箱，1有货
     */
    @TableField("is_empty")
    private Integer isEmpty;

    /**
     * 是否为工序准备箱	0是工序处，1缓存区。当is_empty为空时使用
     */
    @TableField("is_process")
    private Integer isProcess;

    /**
     * 当前状态	0库存，1入库，2出库，3抽检中
     */
    @TableField("curr_status")
    private Integer currStatus;

    /**
     * 当前库位id，关联库位表：t_location
     */
    @TableField("curr_location_id")
    private Long currLocationId;

    /**
     * 当前库位名称
     */
    @TableField("curr_location")
    private String currLocation;

    /**
     * 下一个工序，如果是货物有货存在下一个工序信息，如果空箱没有下一个工序
     */
    @TableField("next_process_code")
    private String nextProcessCode;

    /**
     * 存放开始时间
     */
    @TableField("store_time")
    private LocalDateTime storeTime;

    /**
     * 工序，当前执行工序
     */
    @TableField("in_process_code")
    private String inProcessCode;

    /**
     * 出库开始时间
     */
    @TableField("out_time")
    private LocalDateTime outTime;

    /**
     * 设备RGV id
     */
    @TableField("equipment_id")
    private Long equipmentId;

    /**
     * 货叉编码
     */
    @TableField("fork_code")
    private String forkCode;

    /**
     * 库位层
     */
    @TableField("location_layers")
    private String locationLayers;

    /**
     * 库位列
     */
    @TableField("location_columns")
    private String locationColumns;

    /**
     * 货架0 a货架 1 b货架
     */
    @TableField("goods_shelves")
    private Integer goodsShelves;

    /**
     * rgv代号 0代表一个 1代表一个
     */
    @TableField("rgv_mark")
    private Integer rgvMark;

    /**
     * 跟基板关联字段
     */
    @TableField("location_storage_sub_id")
    private Long locationStorageSubId;

    /**
     * 工单号，00B下发到00A工单编码
     */
    @TableField("work_order_no")
    private String workOrderNo;

    /**
     * 当前库位编码
     */
    @TableField("curr_location_name")
    private String currLocationName;


    public static final String ID = "id";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATOR_ID = "creator_id";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String STATUS = "status";

    public static final String INTER_CODE = "inter_code";

    public static final String CODE = "code";

    public static final String WORD_ORDER_ID = "word_order_id";

    public static final String STORAGE_BOX_ID = "storage_box_id";

    public static final String STORAGE_CODE = "storage_code";

    public static final String IS_EMPTY = "is_empty";

    public static final String IS_PROCESS = "is_process";

    public static final String CURR_STATUS = "curr_status";

    public static final String CURR_LOCATION_ID = "curr_location_id";

    public static final String CURR_LOCATION = "curr_location";

    public static final String NEXT_PROCESS_CODE = "next_process_code";

    public static final String STORE_TIME = "store_time";

    public static final String IN_PROCESS_CODE = "in_process_code";

    public static final String OUT_TIME = "out_time";

    public static final String EQUIPMENT_ID = "equipment_id";

    public static final String FORK_CODE = "fork_code";

    public static final String LOCATION_LAYERS = "location_layers";

    public static final String LOCATION_COLUMNS = "location_columns";

    public static final String GOODS_SHELVES = "goods_shelves";

    public static final String RGV_MARK = "rgv_mark";

    public static final String LOCATION_STORAGE_SUB_ID = "location_storage_sub_id";

    public static final String WORK_ORDER_NO = "work_order_no";

    public static final String CURR_LOCATION_NAME = "curr_location_name";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
